<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="f" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>学生详情-宿管系统</title>
    <link rel="stylesheet" href="../../css/basicLayout.css">

    <style type="text/css">
        #studentInfo{
            width: 500px;
            height: 500px;
            margin: 0 auto;
        }

        #studentInfo  table{
            padding-top: 50px;
            line-height: 50px;
        }

    </style>

</head>
<body>

<!--    头部，用来放导航栏-->
<div id="header">
    <ul>
        <li><a href="/student/index"> 学生管理</a></li>
        <li><a href="/class/index"> 班级管理</a></li>
        <li><a href="/room/index"> 房间管理</a></li>
    </ul>
</div>

<!--子导航栏区域-->
<div id="child">
    <label>学生管理功能</label>
    <ul>

        <li><a href="/student/add/index">学生入住</a></li>
    </ul>
</div>

<!--主体内容区域-->
<div id="content">
    <!--学生详情表单-->
    <div id="studentInfo">
        <table>
            <tr>
                <td>姓名：</td>
                <td>${student.studentName}</td>
            </tr>
            <tr>
                <td>照片：</td>
                <td><img src="/image/${student.headPicPath}"></td>
            </tr>

            <tr>
                <td>性别：</td>
                <td>
                    <c:if test="${student.studentSex==0}">
                        女
                    </c:if>
                        <c:if test="${student.studentSex==1}">
                        男
                    </c:if>
                </td>
            </tr>
            <tr>
                <td>班级：</td>
                <td>${student.myClass.className}</td>
            </tr>
            <tr>
                <td>房间：</td>
                <td>${student.myRoom.roomAddress}</td>
            </tr>
            <tr>
                <td>电话：</td>
                <td>${student.studentPhone}</td>
            </tr>
            <tr>
                <td>入住时间：</td>
                <td><f:formatDate value="${student.studentInDate}" pattern="yyyy-MM-dd"/> </td>
            </tr>
            <tr>
                <td rowspan="2"><a href="${pageContext.request.contextPath}/student/index" ><input type="button" value="返回主菜单" ></a></td>
            </tr>
        </table>
    </div>
</div>

<!--页脚内容区域-->
<div id="footer">页脚</div>
</body>
</html>
